<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>
<body>
    <div id='app'>
        {{msg}}


        <div v-aa v-bb>directive</div>
    </div>


    <div id='app2'>
          
            <div v-aa v-bb>directive==========</div>
        </div>





    <script type='text/javascript'>


        Vue.directive("aa",{
            inserted:function(el){
                console.log(el,6666);
                el.style.color="red"
                el.style.fontSize="50px"
            }
        })

        Vue.directive("bb",{
            inserted:function(el){
                console.log(el,7777);
                el.style.background="green"
            }
        })

        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue'
            }
        });

        var vm2 = new Vue({
            el: '#app2',
            data: {
                msg: 'Hello Vue'
            }
        });
    </script>
</body>
</html>